<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <style>
        .form-horizontal .control-label {
            width: 120px;
            text-align: left;
            padding-right: 0;
            white-space: nowrap;
            padding-left: 15px;
            margin-right: -15px;
        }
        .form-horizontal .col-sm-8 {
            width: calc(100% - 180px);
            margin-left: 0;
            padding-left: 25px;
        }
        .form-group {
            margin-left: 0;
            margin-right: 0;
        }
    </style>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('合集名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text"
                value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('合集简介')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-description" class="form-control" name="row[description]" type="text"
                value="{$row.description|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('合集介绍')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]"
                cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('封面信息')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-cover" data-rule="" class="form-control" size="50" name="row[cover]" type="text" value="{$row.cover|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-cover" class="btn btn-danger faupload"
                                  data-input-id="c-cover"
                                  data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                                  data-multiple="false" data-preview-id="p-cover"><i
                            class="fa fa-upload"></i> 上传</button></span>
                    <span><button type="button" id="fachoose-cover" class="btn btn-primary fachoose"
                                  data-input-id="c-cover" data-mimetype="image/*" data-multiple="false"><i
                            class="fa fa-list"></i> 选择</button></span>
                </div>
                <span class="msg-box n-right" for="c-cover"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-cover"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('销售价格')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" min="0" class="form-control" step="0.01" name="row[price]"
                type="number" value="{$row.price|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('市场价格')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-market_price" data-rule="required" min="0" class="form-control" step="0.01"
                name="row[market_price]" type="number" value="{$row.market_price|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('累计销量')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sale_num" data-rule="required" min="0" class="form-control" step="1"
                name="row[sale_num]" type="number" value="{$row.sale_num|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('关联题库')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-course_id" data-source="course/index" data-multiple="true"
                class="form-control selectpage" name="row[course_id]" type="text" value="{$row.course_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否上架')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-status" name="row[status]" type="hidden" value="{$row.status|htmlentities}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-status" data-yes="1" data-no="2">
                <i class="fa fa-toggle-on text-success {eq name="$row.status" value="2"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('支持在线播放')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-can_play_online" name="row[can_play_online]" type="hidden" value="{$row.can_play_online|htmlentities|default=0}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-can_play_online" data-yes="1" data-no="0">
                <i class="fa fa-toggle-on text-success {eq name="$row.can_play_online" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
            </a>
            <span style="color: #777; font-size: 12px; margin-top: 5px; display: block;">提示：针对需要在第三方观看的网课，请选择不支持。</span>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>